<?php
class ModelCatalogTryonModel extends Model {
    const TYPE_PC_GLASS = 1;
    const TYPE_IOS_GLASS = 2;
    const TYPE_ANDROID_GLASS = 3;

    public $table = 'tryon_model';

	public function findByProductId($product_id)
    {
        $tbl = $this->getTable();

        $sql = "SELECT * FROM $tbl WHERE product_id = '$product_id' ORDER BY `type`, `sort_order`";

        $query = $this->db->query($sql);

        return $query->rows;
	}
}
